<template>
    <div class="news">
      <ul>
        <li v-for="news in newsList" :key="news.id">
          <RouterLink to="/news/detail">{{news.tittle}}</RouterLink>
        </li>
      </ul>

<!--   展示区   -->
      <div class="news-content">
        <RouterView></RouterView>

      </div>
    </div>
</template>


<script setup lang="ts">
import { reactive } from 'vue'

const newsList = reactive([
  {id:'xinwen01',tittle:'很好的抗癌食物',content:'西兰花'},
  {id:'xinwen02',tittle:'如何让一夜暴富',content:'学IT'},
  {id:'xinwen03',tittle:'震惊，万万没想到',content:'明天是周一'},
  {id:'xinwen04',tittle:'一个好消息',content:'快过年了'}
])
</script>

<style scoped>
/* 新闻 */
.news {
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  height: 100%;
}
.news ul {
  margin-top: 30px;
  list-style: none;
  padding-left: 10px;
}
.news li>a {
  font-size: 18px;
  line-height: 40px;
  text-decoration: none;
  color: #64967E;
  text-shadow: 0 0 1px rgb(0, 84, 0);
}
.news-content {
  width: 70%;
  height: 90%;
  border: 1px solid;
  margin-top: 20px;
  border-radius: 10px;
}
</style>